<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        <link rel="stylesheet" type="text/css" href="../scripts/table/jquery-ui-1.8.4.custom.css"/>
        <link rel="stylesheet" type="text/css" href="../scripts/table/tablesort.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/table/jquery.dataTables.js"></script>
        <%--<link rel="stylesheet" type="text/css" href="../scripts/table/advancedtable.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/table/advancedtable.js"></script>--%>

        <style type="text/css">
            #ui-datepicker-div
            {
                z-index: 9999999;
            }
            .record_row_left a:hover{color:black}
            .tk{
                color: #FFFFFF;
                margin-left: 632px;
                margin-top: 9px;
                position: absolute;
                z-index: 100;
            }
            .card_add_tour{
                color: #7F9FBE;
                height: 20px;
                margin-left: 872px !important;
                margin-top: 19px;
                position: absolute;
                z-index: 2;
            }
            .dataTables_filter{
                margin-right: 40px;
                color:#fff;
            }
            .dataTables_filter lable{
                color:#fff;
            }
            .dataTables_info{
                color:#fff;
            }
            .dataTables_length{
                color:#fff;
            }

        </style>
        <script type="text/javascript">
            $j = jQuery.noConflict();
            $j(document).ready(function() {
                initThickBox('.thickbox');
                $j('#example').dataTable( {
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "oLanguage": {
                        "sInfo": " Hiển thị _END_ trên tổng số _TOTAL_ dữ liệu.",
                        "sLengthMenu": "Hiển thị _MENU_ dòng",
                        "sSearch": "Tìm kiếm"
                    }
                } );
               
                //$j("#searchtable").show();
                //$j("#table1").advancedtable({searchField: "#search", loadElement: "#loader", searchCaseSensitive: false, ascImage: "images/up.png", descImage: "images/down.png"});

              
            } );
        
        </script>
    </head>




    <body>
        <f:view>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <a4j:form >
                <%--<div class="content_detail">
                    <div class="list_item_user">
                        <div class="item_content" style="display: block">
                            <div class="infomation_form">
                                 <h:panelGroup rendered="#{loginSession.right.TKH_LST_CRE}">
                                <div class="card_add_tour" style="margin-left:11px; padding:0px">
                                    <h:outputLink   value="uploadfile.jsp?pn100=#{TourBean.fk350}&fs200=#{documentController.fs200}&pm650=none&page=managerTour.jsp&type=ALL&table=V050&KeepThis=true&amp;TB_iframe=true&amp;height=295&amp;width=435&amp;modal=true" styleClass="thickbox" id="thickbox2"  >
                                        <img src="../images/add_tab.png" alt="add" title="add" /> 
                                    </h:outputLink>
                                </div>
                                 </h:panelGroup>
                                <div style="float:left ; width:100%; min-height:110px;">--%>
                                    <%--        <div style="float:left; width:150px; height:200px; margin:0px 10px 10px 10px;">
                                                <h:outputLink  value="uploadfile.jsp?pn100=#{documentController.pn100}&pm650=#{documentController.pm650}&height=165px&width=410px" styleClass="fancybox" id="fancybox"  >
                                                    <img src="<h:outputText value="#{documentController.avata}"/>" width="150" height="200" alt="" />
                                                </h:outputLink>
                                            </div> --%>
                                    <%--<h:inputHidden id="idpm650" value="#{documentController.pm650}" />

                                    <div style="float:left; width:100%; min-height:100px; height:auto;">
                                        <div class="record_row_upload_main">  --%>                                     
<%--
                                            <div class="half left">
                                                <table width="100%" class="normal" id="searchtable" border="0" cellspacing="4" cellpadding="0" style="display:none;">
                                                    <tr>
                                                        <td width="27%"><input name="search" type="text" id="search" style="display:none;" /></td>       
                                                    </tr>
                                                </table>
                                                <table width="100%" id="table1" class="advancedtable" border="0" cellspacing="0" cellpadding="0">
                                                    <thead>
                                                        <tr>
                                                           <th>STT</th>
                                                            <th>Tên file</th>
                                                            <th>Mô tả</th>
                                                            <th>Ngày cập nhật</th>
                                                            <th>Người cập nhật</th>
                                                            <th></th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <a4j:repeat value="#{documentController.listdocument}" var="item" rowKeyVar="index">
                                                        <tr>
                                                                <td style="border-right:2px solid #fff;"><h:outputText value="#{index+1}" /></td>
                                                                <td style="border-right:2px solid #fff;"> <h:outputLink     value="#{item.download}"  target="_Bank" >
                                                                        <h:outputText value="#{item.mv652}" />
                                                                    </h:outputLink></td>
                                                                <td style="border-right:2px solid #fff;"> <h:outputText value="#{item.mv651}" /></td>
                                                                <td style="border-right:2px solid #fff;" class="center">  <h:outputText value="#{item.ml668}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText></td>
                                                                <td style="border-right:2px solid #fff;" > <h:outputText value="#{item.ml669}" /></td>
                                                                <td class="center"><h:outputLink      value="delete.jsp?id=#{item.pm650}&pn100C=#{documentController.pn100}&page=#{uploadController.pagereload}&flag=M650&height=150px&width=300px" styleClass="fancybox">
                                                                        <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                                    </h:outputLink></td>
                                                            </tr>
                                                       </a4j:repeat>
                                                       
                                                      
                                                       
                                                    </tbody>
                                                </table>
                                            </div>

                                            <div class="spacer"><!-- SPACER --></div>--%>
                                   
                                            <%--<div id="demo">

                                                <table cellpadding="0" cellspacing="0" border="0" class="display" id="example" width="100%">
                                                    <thead>
                                                        <tr>
                                                            <th><h:outputText value="#{locale.num1}"/></th>
                                                            <th><h:outputText value="#{locale.file_name}"/></th>
                                                            <th><h:outputText value="#{locale.description}"/></th>
                                                            <th><h:outputText value="#{locale.date_update}"/></th>
                                                            <th><h:outputText value="#{locale.person_update}"/></th>
                                                            <th></th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <a4j:repeat value="#{documentController.listdocument}" var="item" rowKeyVar="index">
                                                            <tr class="odd gradeX">
                                                                <td style="border-right:2px solid #fff;"><h:outputText value="#{index+1}" /></td>
                                                                <td style="border-right:2px solid #fff;"> <h:outputLink     value="#{item.download}"  target="_Bank" >
                                                                        <h:outputText value="#{item.mv652}" />
                                                                    </h:outputLink></td>
                                                                <td style="border-right:2px solid #fff;"> <h:outputText value="#{item.mv651}" /></td>
                                                                <td style="border-right:2px solid #fff;" class="center">  <h:outputText value="#{item.ml668}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText></td>
                                                                <td style="border-right:2px solid #fff;" > <h:outputText value="#{item.ml669}" /></td>
                                                                 <h:panelGroup rendered="#{loginSession.right.TKH_LST_DEL}">
                                                                <td class="center"><h:outputLink      value="delete.jsp?id=#{item.pm650}&page=documentTour.jsp&flag=M650&height=150px&width=300px" styleClass="fancybox">
                                                                        <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                                    </h:outputLink></td></h:panelGroup>
                                                            </tr>
                                                        </a4j:repeat>




                                                    </tbody>

                                                </table>
                                            </div>
                                          
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>--%>
                <div class="list_customer" style="width:910px; height:auto; overflow-y:auto; overflow-x: hidden; border: solid; border-width: 1px; border-color: rgb(222,222,222);">
                    <h:inputHidden id="idpm650" value="#{documentController.pm650}" />
                    <rich:dataTable value="#{documentController.listdocument}" var="item" rowKeyVar="index"
                                    rows="50"
                                    rowClasses="blue,white"
                                    width="722px" columnClasses=",columns,columns,columns" 
                                    id="table" styleClass="machinePosDataTable">

                        <rich:column style="width:40px; text-align:center">
                            <f:facet name="header">
                                <h:outputText value="#{locale.num1}" />
                            </f:facet>
                            <h:outputText value="#{index+1}" />
                        </rich:column>
                        <rich:column style="width:270px;">
                            <f:facet name="header">
                                <h:outputText value="#{locale.file_name}" />
                            </f:facet>
                            <div style="width:240px;">
                                <h:outputLink     value="#{item.download}"  target="_Bank" >
                                                                        <h:outputText value="#{item.mv652}" />
                                                                    </h:outputLink>
                            </div>
                        </rich:column>

                        <rich:column width="200px">
                            <f:facet name="header">
                                <h:outputText value="#{locale.description}" />
                            </f:facet>

                            <div style="width:200px;">
                                <h:outputText value="#{item.mv651}" />
                            </div>
                        </rich:column>


                        <rich:column  width="120px">
                            <f:facet name="header">
                                <h:outputText value="#{locale.date_update}" />
                            </f:facet>

                            <div style="width:120px;">
                               <h:outputText value="#{item.ml668}"><f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText>
                            </div>
                        </rich:column>
                        <rich:column  width="200px">
                            <f:facet name="header">
                                <h:outputText value="#{locale.person_update}" />
                            </f:facet>

                            <div style="width:200px;">
                                <h:outputText value="#{item.ml669}" />
                            </div>
                        </rich:column>



                        <rich:column  style="width:auto">
                            <f:facet name="header">
                                <h:outputText value="#{locale.delete}" />
                            </f:facet>
                            <div style="width:auto;">
                                <h:panelGroup rendered="#{loginSession.right.TKH_LST_DEL}">
                                                                <h:outputLink      value="delete.jsp?id=#{item.pm650}&page=documentTour.jsp&flag=M650&height=150px&width=300px" styleClass="fancybox">
                                                                        <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                                    </h:outputLink>
                                </h:panelGroup>
                            </div>

                        </rich:column>
                        <f:facet name="footer">

                        </f:facet>
                    </rich:dataTable>
                </div>
                <rich:datascroller id="ds" for="table" style="margin-top: 10px;"></rich:datascroller>
                <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                 height="30" width="40" zindex="2000">
                    <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                </rich:modalPanel>
            </a4j:form>
        </f:view>
    </body>
</html>